package jdk8;
import java.util.*;
import java.util.stream.Collectors;

/**
 * @author oldliu
 * @since 1.0
 */
public class ArrayKist2 {
    public static void main(String[] args) {
        List<Integer> list=Arrays.asList(1,2,45,67,73,7,15,26,77,23,66);
        //遍历输出
//        for(int i:list)
//            System.out.println(i);
        list.forEach(System.out::println);
        List<Integer> l2 = list.stream().filter(x -> x % 2 == 1).collect(Collectors.toList());
        System.out.println(l2);
    }
}
